package com.bibibx.rest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.bibibx.vo.UserVo;

@RestController
@RequestMapping("/users2")
@Api(description="用户管理2")
public class TestRest2 {

	@RequestMapping(value="get/{userid}", method=RequestMethod.GET)
	@ApiOperation(value="根据用户ID获取用户信息",notes="根据用户ID获取用户信息，ID不能为空")
	public UserVo getUser(@ApiParam( name = "userid", value = "用户ID", required = true)@PathVariable("userid")long id){
		UserVo vo = new UserVo();
		vo.setId(id);
		vo.setName("李四");
		return vo;
	}
	
}
